<template>
	<gui-page ref="guiPage" :customHeader="true">
		<!-- 导航 -->
		<template v-slot:gHeader>
			<nav-bar-custom left-icon="left" :title="$t('taskManagement.operationLog')" @clickLeftBack="clickLeftBack"
				scanType="0"></nav-bar-custom>
		</template>

		<template v-slot:gBody>
			<view v-if="data.logList.length == 0" class="noticeHooks">
				{{ data.logList.length == 0 ? $t('stockManage.notAvailable') : $t('stockManage.without') }}
			</view>
			<view class="record-card" v-for="(item, index) in data.logList" :key="`${item.createUserNo}` + `${index}`"
				v-else>
				<!-- <uni-icons class="close-icons" type="closeempty" color="#9C9C9C" size="30"
					@click="handelClosePopup(index, item)"></uni-icons> -->
				<view class="card-mini-head">
					<view class="title-line"></view>
					<text>{{ $t('translationImage.serialNumber') }}：{{ index+1 }}</text>
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('taskList.ourSystem')}}：</text>{{ item.taskCode }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{$t('taskList.rcsSystem') }}：</text>{{ item.robotTaskCode }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('taskManagement.taskType')}}：</text>{{ item.taskBusinessType }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('taskList.previousStartLine')}}：</text>{{item.firstStartLineCode }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('taskList.previousStartPoint')}}：</text>{{item.firstEndLocationCode }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('taskList.previousEndLine')}}：</text>{{item.firstEndLineCode }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('taskList.previousEndPoint')}}：</text>{{item.firstStartLocationCode }}
				</view>
				<view class="custom-card-itemOne">
					<view class="card-item-50">
						<text class="item-info-title">{{$t('taskManagement.operationType') }}：</text>{{ item.operation }}
					</view>
				</view>
				<!-- <view class="custom-card-itemOne">
					<view class="card-item-50">
						<text class="item-info-title">{{$t('multilingual.productionLine') }}：</text>{{ item.line_code}}</view>
					<view class="card-item-50">
						<text class="item-info-title">{{$t('mexico.position') }}：</text>{{ item.location_code }}</view>
				</view> -->
				<view class="custom-card-itemOne">
					<view class="card-item-50"><text class="item-info-title">{{ $t('taskList.type')}}：</text>{{item.type }}</view>
					<view class="card-item-50">
						<text class="item-info-title">{{$t('finishedInventory.creator') }}：</text>{{ item.createUserName }}
					</view>
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{$t('finishedInventory.creationTime') }}：</text>{{ item.createTime }}
				</view>
			</view>
		</template>
	</gui-page>
</template>

<script setup>
import { navigate, navigateBack } from '@/utils/routerSkip.js';
import { reactive, ref, onMounted, computed, watch, toRaw, toRef } from 'vue';
import { getDataDictionaryFn, pitchOnFn, sortClass } from '@/utils/index.js'
import superweiCombox from '@/components/superweiCombox';
import tableColor from '@/hooks/tableColor.js'
import storageBin from '@/components/storageBin.vue'
import { basPdaOperationLogFn } from '@/utils/index.js';
import { OPERATION_LOOK, } from '@/constant/index.js'
import { useStore } from "vuex";
import { onBackPress } from '@dcloudio/uni-app';
import pdaScan from '@/hooks/pdaScan.js'
import { getTaskLogByTaskCode } from '@/api/api.js'

//国际化引入
import { useI18n } from 'vue-i18n';
const { t } = useI18n();

let store = useStore()
const { scan } = pdaScan()

components: {
	storageBin,
		superweiCombox
}
let { tableData } = tableColor();
const { cellStyle, cellHeaderStyle } = tableColor();
const props = defineProps({
	id:String
})

const data = reactive({
	logList: [],
})

onMounted(() => {
	getTaskLog()
})
const getTaskLog = () => {
	getTaskLogByTaskCode({
		taskCode: props.id
	}).then(res => {
		console.log(res)
		data.logList = res.result
	})
}
</script>

<style scoped lang="scss"></style>
